﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using TiTi.tea.Api.Models;
using TiTi.tea.BLL;

namespace TiTi.tea.Api.Controllers
{
    [RoutePrefix("api/Spec")]
    public class SpecController : ApiController
    {
        private SpecBLL bll = new SpecBLL();

        /// <summary>
        /// 根据模板获取规格
        /// </summary>
        /// <param name="tplId">模板id</param>
        /// <returns></returns>
        [Route("GetByTplId")]
        [HttpGet]
        public Result GetByTplId(int tplId)
        {
            return Result.Success(bll.GetByTplId(tplId));
        }
    }
}